package com.xw.handler;

import com.xw.enums.ResultEnum;
import com.xw.exception.YdException;
import com.xw.utils.ResultVOUtil;
import com.xw.vo.ResultVO;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class AuthorizeExceptionHandler {

    @ExceptionHandler(value = YdException.class)
    public ResultVO<?> handlerAuthorizeException() {
        return ResultVOUtil.fail(ResultEnum.PLEASE_RELOGIN);
    }

}
